/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package co.edu.uniminuto.Videominuto.entities;

import java.io.Serializable;
import javax.persistence.Basic;
import javax.persistence.Column;
import javax.persistence.Embeddable;
import javax.validation.constraints.NotNull;
import javax.validation.constraints.Size;

/**
 *
 * @author JULIAN
 */
@Embeddable
public class ClienteCalificacionVideoPK implements Serializable {
    @Basic(optional = false)
    @NotNull
    @Size(min = 1, max = 30)
    @Column(name = "id_cliente")
    private String idCliente;
    @Basic(optional = false)
    @NotNull
    @Column(name = "id_calificacion")
    private int idCalificacion;
    @Basic(optional = false)
    @NotNull
    @Column(name = "id_isan_vdi")
    private int idIsanVdi;

    public ClienteCalificacionVideoPK() {
    }

    public ClienteCalificacionVideoPK(String idCliente, int idCalificacion, int idIsanVdi) {
        this.idCliente = idCliente;
        this.idCalificacion = idCalificacion;
        this.idIsanVdi = idIsanVdi;
    }

    public String getIdCliente() {
        return idCliente;
    }

    public void setIdCliente(String idCliente) {
        this.idCliente = idCliente;
    }

    public int getIdCalificacion() {
        return idCalificacion;
    }

    public void setIdCalificacion(int idCalificacion) {
        this.idCalificacion = idCalificacion;
    }

    public int getIdIsanVdi() {
        return idIsanVdi;
    }

    public void setIdIsanVdi(int idIsanVdi) {
        this.idIsanVdi = idIsanVdi;
    }

    @Override
    public int hashCode() {
        int hash = 0;
        hash += (idCliente != null ? idCliente.hashCode() : 0);
        hash += (int) idCalificacion;
        hash += (int) idIsanVdi;
        return hash;
    }

    @Override
    public boolean equals(Object object) {
        // TODO: Warning - this method won't work in the case the id fields are not set
        if (!(object instanceof ClienteCalificacionVideoPK)) {
            return false;
        }
        ClienteCalificacionVideoPK other = (ClienteCalificacionVideoPK) object;
        if ((this.idCliente == null && other.idCliente != null) || (this.idCliente != null && !this.idCliente.equals(other.idCliente))) {
            return false;
        }
        if (this.idCalificacion != other.idCalificacion) {
            return false;
        }
        if (this.idIsanVdi != other.idIsanVdi) {
            return false;
        }
        return true;
    }

    @Override
    public String toString() {
        return "co.edu.uniminuto.Videominuto.entities.ClienteCalificacionVideoPK[ idCliente=" + idCliente + ", idCalificacion=" + idCalificacion + ", idIsanVdi=" + idIsanVdi + " ]";
    }
    
}
